package com.diseaseInformation

class Disease {
    static searchable = true              // <-- Make Comments searchable
    //For many to many ,can add symtoms to disease Only
    //static hasMany = [problems:Problem]
    //For one(diseseGroup) to many(disease)
    static belongsTo = [disease_group:Disease_Group]

    //information of disease
      String name
      String data
      Date lastUpdated

    //History
    //float rating//max 5.0
    int viewer = 0//number of user viewer

    String toString(){
        return name;
    }
    
    static constraints = {
      name(unique:true,blank:false)
      data(blank:false)
      disease_group(nullable:true)

    }
}
